<template>
  <div>
    <van-card
      @click="$router.push('/detail/'+obj.houseCode)"
      class="van-hairline--bottom"
      price="2000元/月"
      :desc="obj.desc"
      :title="obj.title"

    >
      <template #tags>
        <van-tag plain type="danger" v-for="item,index in obj.tags" :key="index">{{item}}</van-tag>
      </template>
      <template #thumb>
        <van-image
          :src="'http://liufusong.top:8080'+obj.houseImg"
        />
      </template>
      <template #price>
        <span class="pricenum">2000</span>
        <span>元/月</span>
      </template>
    </van-card>
  </div>
</template>

<script>
export default {
  props: {
    obj: {
      type: Object,
      required: true
    }
  },
  data () {
    return {

    }
  },

  created () {
  },

  methods: {

  }
}
</script>

<style scoped lang='less'>
/deep/.van-card{
  background-color: #fff;
  padding: 20px 0;
  margin-top: 0;
  height: 120px;
  .van-card__price{
    color: #FA5741;
    .pricenum{
    margin-right: 5px;
    font-weight: 700;
    font-size: 16px;
  }
  }
  .van-tag--danger.van-tag--plain{
    color: #39BECD;
  }
  .van-card__desc {
    font-size: 12px;
    color: #ccc;
    margin: 5px 0;
  }
  .van-card__title {
    display: inline-block;
    width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    color: #394043;
    font-weight: 700;
  }
  .van-card:not(:first-child){
    margin: 0;
  }
  .van-card__thumb{
    width: 106px;
    height: 80px;
    margin-right: 15px;
  }
  .van-image{
    width: 100%;
    height: 100%;
    border-radius:0;
  }
}

</style>
